package com.j4dream.repository.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;

import com.j4dream.dbentity.DailyVolumeDBVO;
import com.j4dream.repository.DailyVolumeRepo;

@Repository
public class DailyVolumeRepoImpl implements DailyVolumeRepo {

	@Autowired
	private MongoTemplate mongoTemplate;

	@Override
	public DailyVolumeDBVO findOneByDomain(String domain) {
		// TODO Auto-generated method stub
		Query query = Query.query(Criteria.where("domains").is(domain));
		return mongoTemplate.findOne(query, DailyVolumeDBVO.class);
	}

}
